<?php if (!defined('THINK_PATH')) exit();?>   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
		<title><?php echo C("SITE_INFO.name");?></title>
	
		
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="__PUBLIC__/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="__PUBLIC__/css/cms_admin/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="__PUBLIC__/css/invalid.css" type="text/css" media="screen" />	
		

	  
		<!-- jQuery -->
		<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
		
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="__PUBLIC__/scripts/simpla.jquery.configuration.js"></script>
        		
		<!-- jQuery WYSIWYG Plugin -->
		<script type="text/javascript" src="__PUBLIC__/scripts/jquery.wysiwyg.js"></script>
  
		 <!-- jQuery UI  -->         
		<link rel="stylesheet" href="__PUBLIC__/scripts/ui/redmond/jquery-ui-1.8.6.css">        
        <script type="text/javascript" src="__PUBLIC__/scripts/ui/jquery-ui-1.8.6.min.js"></script>
		
        <script src="__PUBLIC__/scripts/utils.js" type="text/javascript"></script>
        
    <!-- ckeditor  -->        
     <link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
     <script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
        
	  <script>	
          KindEditor.ready(function(K) {
              var editor = K.create('textarea.HTMLeditor', {
                          allowFileManager : true,
                          width : 800,
                          height : 400,
						  afterBlur: function(){this.sync();}
				}); 
          });	
      </script>
       
      <script type="text/javascript" src="__PUBLIC__/scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
      <script type="text/javascript" src="__PUBLIC__/scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>      
      <link rel="stylesheet" type="text/css" href="__PUBLIC__/scripts/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
      <script>
	  $(function(){
		 $("a.fancyBox").fancybox(); 
	  })	 
	  </script>
      
        
        
     <script>
        $(function() {
          $( "#datepicker" ).datepicker({dateFormat: "yy-mm-dd"});	
		  $( "#sub_tabs" ).tabs();  
        });	
		function delImages()
		{
			  $("#image").html('');
			  $("input[name=del_iamge]").val("true");			  
		} 
		$(function(){
			  $('.content-box .content-box-content div.tab-content').hide(); // Hide the content divs
			  $('ul.content-box-tabs li a.default-tab').addClass('current'); // Add the class "current" to the default tab
			  $('.content-box-content div.default-tab').show(); // Show the div with class "default-tab"
			  
			  $('.content-box ul.content-box-tabs li a').click( // When a tab is clicked...
				  function() { 				  
				  
					 var insertId = $(this).attr("href").substring($(this).attr("href").length-1);
					 var url = $(".insert a").attr("href").replace(/room\/\d/,"room/"+insertId);
					 $(".insert a").attr("href", url);				
					  
					  $(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs
					  $(this).addClass('current'); // Add class "current" to clicked tab
					  var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
					  $(currentTab).siblings().hide(); // Hide all content divs
					  $(currentTab).show(); // Show the content div with the id equal to the id of clicked tab
					  return false; 
				  }
			  );
		});
	</script>  

	</head>
  
	<body>
    
    

    

    
    <div id="body-wrapper" > <!-- Wrapper for the radial gradient background -->		

        <!--left start-->
		
        <div id="sidebar"   >
 <div id="sidebar-wrapper" style="position:relative; height:100%"> 
 <!-- Sidebar with logo and menu -->
		  
    <!-- Sidebar Profile links -->
    <div id="profile-links" style="margin-top:110px; font-size:12px;">
        Hello, <a href="#" onclick="return false;" title="Edit your profile"><?php echo ($loginName); ?></a>			
        <br />
        <br />
        <a href="__APP__" target="_blank" title="View the Site">View the Site</a> | 
        <a href="<?php echo U('Login/logoff');?>" title="Sign Out">Sign Out</a>
     </div>     
        
			
<ul id="main-nav"> 		
				
<?php echo W('Nav');?>
<!--	<li id="li_Menu_1">    
	    <a href="#" class="nav-top-item  <?php if((MODULE_NAME != "Users") and (MODULE_NAME != "Configuration")): ?>current<?php endif; ?>">Menu</a>
    	<ul style='display:none;' >
        	
            <?php if(is_array($nav_name)): $i = 0; $__LIST__ = $nav_name;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; if(($v != 'Users') and ($v != 'Configuration')): ?><li>           
                        <a href="<?php echo U($v.'/index');?>" class="<?php if(MODULE_NAME == $v): ?>current<?php endif; ?>"><?php echo ($v); ?></a>
                    </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>	        
		</ul>
	</li>	
  <?php if((in_array('Users',$nav_name)) or in_array('Configuration',$nav_name) or (session('adminId') == 1) ): ?><li id="li_Menu_2">    
            <a href="#" class="nav-top-item <?php if((MODULE_NAME == "Users") or (MODULE_NAME == "Configuration")): ?>current<?php endif; ?>">Configuration</a>
            <ul style='display:none;' >
                
               <?php if(is_array($nav_name)): $i = 0; $__LIST__ = $nav_name;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; if(($v == 'Users') OR ($v == 'Configuration')): ?><li>           
                            <a href="<?php echo U($v.'/index');?>" class="<?php if(MODULE_NAME == $v): ?>current<?php endif; ?>"><?php echo ($v); ?></a>
                        </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>	        
            </ul>
        </li><?php endif; ?> -->
    
    
    	
</ul> 				
  </div>
</div> 
        <!--left end-->
        
        
        <!-- End #sidebar -->			
		<div id="main-content"> <!-- Main Content Section with everything -->
        <div  id="header_logo"><?php echo C("SITE_INFO.name");?></div>	 		
			
			<!-- Page Head -->
			<div style="float:left;">
              <h2><?php if(tep_not_null($titleArr[1])): echo ($titleArr[1]); ?> <?php else: ?> 新增公告<?php endif; ?></h2>
            </div>
			<div class="clear"></div> <!-- End .clear -->           
                <!-- Insert -->
                <form action="<?php echo U($action);?>" name="editForm" method="post" enctype="multipart/form-data" >
                 <input type="hidden" name="editId" value="<?php echo ($editId); ?>" >		
                <div class="content-box">				
                    <div class="content-box-header">  
                                     
                          <ul class="content-box-tabs">			
                                      
                              <li><a href="#tab1" id="menu1" class="default-tab current" style="text-transform:capitalize">General</a></li>	 
                              <li><a href="#tab2" id="menu2" style="text-transform:capitalize">Data</a></li>	       
                                                          
                          </ul>	 
                           
                         <span class="insert" style=" float:right; line-height:40px; font-size:14px; font-weight:bold;"><a href="<?php echo U('index');?>">List </a>&nbsp; &nbsp; </span>                        	
                      <div class="clear"></div>					
                    </div>
                    
                   
                    <div class="content-box-content">	                     
                       
                        <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->	                            
                             
                             <div id="sub_tabs">                               
                               	  <ul>
                                    <?php if(is_array($lang)): $k = 0; $__LIST__ = $lang;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li><a href="#tabs2-<?php echo ($vo["value"]); ?>"><img src="__PUBLIC__/images/<?php echo ($vo["value"]); ?>_icon.gif"> <?php echo ($vo["txt"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>   
                                 </ul>
                           
                               
                                <?php if(is_array($langList)): $k = 0; $__LIST__ = $langList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><div class="tabs" id="tabs2-<?php echo ($vo); ?>">                                    
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="editContent">
                                      <tr>
                                        <td class="fieldText">标题:</td><td><input class="text-input small-input" value="<?php echo ($titleArr[$k]); ?>" style="width:590px!important"  type="text" id="news_title_<?php echo ($k); ?>" name="news_title_<?php echo ($k); ?>" /></td>
                                      </tr>
                                      <tr>  
                                        <td  class="fieldText" style="vertical-align:top;">内容:</td><td> <textarea style="height:300px;width:590px!important" class="page_description HTMLeditor" name="news_description_<?php echo ($k); ?>"><?php echo ($descArr[$k]); ?></textarea></td>
                                      </tr>
                                    </table>    
                                    </div><?php endforeach; endif; else: echo "" ;endif; ?>   
                              </div> 
                           </div>  
                             
                                          
                       <!-- End #tab1 --> 
                       <div class="tab-content" id="tab2">
                       	 <p>
                              <label>置顶:<input type="checkbox" style="vertical-align:middle" name="top_flag"  value="1" <?php if($listInfo['top_flag'] == 1): ?>checked="checked"<?php endif; ?>/></label>
                         </p> 
                       	 <p>
                              <label>状态:<input type="checkbox" style="vertical-align:middle" name="news_status"  value="1" <?php if($listInfo['news_status'] == 1): ?>checked="checked"<?php endif; ?>/></label>
                         </p>    
                        <p>
                          <label>排序:&nbsp;</label>  
                          <input class="text-input small-input"  type="text" name="sort_order"  value="<?php echo ($listInfo["sort_order"]); ?>" />                                                                
                        </p>   
                        
                        <p>
                          <label>日期:&nbsp;</label>  
                          <input class="text-input small-input"  type="text" id="datepicker" name="news_added"  value="<?php echo (date('Y-m-d',strtotime($addDate))); ?>" />                                                                
                        </p>                                     
                                          
                        
                        <p>
                          <label>图片:&nbsp;<input type="file" id="news_image" name="news_image"></label>                              
                          <?php echo ($imageShow); ?>                                      
                        </p>
                        <p>
                        	 <label>浏览次数:&nbsp;<?php echo ($listInfo["viewd"]); ?></label>  
                        </p>
                        
                       <!--  <p>
                          <label>Image Description:</label>                             
                          <?php if(is_array($langList)): $k = 0; $__LIST__ = $langList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><p>
                                <img src="__PUBLIC__/images/<?php echo ($vo); ?>_icon.gif"> 
                                <input class="text-input small-input" value="<?php echo ($iDescArr[$k]); ?>" style="width:590px!important"  type="text" id="image_description_<?php echo ($k); ?>" name="image_description_<?php echo ($k); ?>" /> 
                            </p><?php endforeach; endif; else: echo "" ;endif; ?>                                             
                        </p> -->
                       </div>                         
                    </div>
                       
                
                </div>                 
                <!--End Insert -->
                 <div class="clear"></div>
                            <input class="button" style="text-transform:capitalize" type="submit" name="BtnSave"  value="<?php echo ($actionName); ?>" />&nbsp;&nbsp;
                            <input class="button" type="button" name="back" onClick="window.location.href='<?php echo U('index');?>'"  value="Back" />    
			</form>
			
			<div class="clear"></div>
			
			
			<!-- Start Notifications -->
			
			

			
			<!-- End Notifications -->
			
            <div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Copyright 2013
				</small>
			</div>
			
			
			
			<!-- End #footer -->
			
		</div> <!-- End #main-content -->
		
	</div>
	
	
	
	</body>
<!-- Download From www.exet.tk-->
</html>